<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        // 扩展运算符
        function push(array, ...items) {
            array.push(...items)
        }

        function add(x, y) {
            return x + y
        }

        const number = [21,4];
        add(...number);
        // console.log(add(...number));
        
        // 代替函数的 apply 方法
        Math.max.apply(null, [12,321,11])

        Math.max(...[12,321,114])

        console.log(Math.max(...[12,321,114]));
        


    </script>
</body>
</html>